doctype html
html lang="en"
  head
    = include_gon
    = stylesheet_link_tag "api_v2", :media => "all"
    = javascript_include_tag "api_v2"
    = render 'shared/html5'
    = render 'shared/meta'
  body id='#{body_id}' data-lang="#{locale_name}"
    .navbar.navbar-default.navbar-static-top role='navigation'
      .container
        .navbar-header
          a.navbar-brand href='#' Peatio API Document
        ul.nav.navbar-nav.pull-right
          - if current_user
            = top_nav_link(current_user.email, settings_path, 'user', controllers: ['two_factors', 'identities', 'id_documents'])
            - if is_admin?
              = top_nav_link(t('header.dashboard'), admin_dashboard_path, 'dashboard')
            li: a#sign_out href='#{main_app.signout_path}'
              i.fa.fa-sign-out
              span = t('header.signout')
          - else
            = top_nav_link(t('header.signin'), signin_path, '')
            = top_nav_link(t('header.signup'), signup_path, '')

          li.dropdown
            a.dropdown-toggle href="#" data-toggle="dropdown"
              img src='#{language_path}'
              b.caret
            ul#languages.dropdown-menu
              - I18n.available_locales.each do |lang|
                li: a href="?lang=#{lang}": img src='#{language_path(lang)}'

    .container
      = yield

    = render 'shared/footer'
